import request from '/@/utils/request';

export function queryNodes(queryForm) {
	return request({
		url: '/service/querynodes.action',
		method: 'post',
		params: queryForm,
	});
}

export function queryNodeConfig(queryForm, ddesa) {
	return request({
		headers: {
			'DDE-SA': ddesa,
		},
		url: '/service/queryNodeConfig.action',
		method: 'post',
		params: queryForm,
	});
}

export function updateNodeConfig(queryForm) {
	return request({
		url: '/service/updateNodeConfig.action',
		method: 'post',
		params: queryForm,
	});
}

export function copyNode(queryForm) {
	return request({
		url: '/eslithe/copyNode.action',
		method: 'post',
		// params: queryForm
		data: queryForm,
	});
}

export function queryNodeByType(queryForm) {
	return request({
		url: '/eslithe/queryNodeByType.action',
		method: 'post',
		data: queryForm,
	});
}

export function updateNode(queryForm) {
	return request({
		url: '/eslithe/updateNode.action',
		method: 'post',
		data: queryForm,
	});
}

export function queryMaxNodes(queryForm) {
	return request({
		url: '/eslithe/queryMaxNodes.action',
		method: 'post',
		data: queryForm,
	});
}

// export function queryNodes(queryForm) {
//   return request({
//     url: '/service/querynodes.action',
//     method: 'post',
//     params: queryForm
//   })
// }

export function addNode(queryForm) {
	return request({
		url: '/eslithe/addNode.action',
		method: 'post',
		params: queryForm,
	});
}

export function deleteNode(queryForm) {
	return request({
		url: '/eslithe/deleteNode.action',
		method: 'post',
		params: queryForm,
	});
}
